<html>
<head><meta charset="utf-8"><title>GATs triage · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html">GATs triage</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225316677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225316677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225316677">(Feb 05 2021 at 15:57)</a>:</h4>
<p>So, the good news is that with <a href="https://github.com/rust-lang/rust/issues/79554">#79554</a> being merged, there are only 2 (maybe 3) blocking issues left (for lifetimes only)</p>



<a name="225316775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225316775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225316775">(Feb 05 2021 at 15:58)</a>:</h4>
<p>1 of them might be mislabeled (<a href="https://github.com/rust-lang/rust/issues/77905">#77905</a>) and might be a "working as expected"</p>



<a name="225316810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225316810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225316810">(Feb 05 2021 at 15:58)</a>:</h4>
<p>And I've started to look into <a href="https://github.com/rust-lang/rust/issues/76407">#76407</a></p>



<a name="225316946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225316946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225316946">(Feb 05 2021 at 15:59)</a>:</h4>
<p>I need to go through all the non-blocking issues and see which ones are fixed now (but I'm going to wait until the next nightly so I can do that on the playground)</p>



<a name="225317146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225317146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225317146">(Feb 05 2021 at 16:00)</a>:</h4>
<p>But, considering how <em>few</em> blocking issues there are, we should definitely think about whether it <em>does</em> make sense to split GATs into lifetimes vs. all</p>



<a name="225317213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225317213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225317213">(Feb 05 2021 at 16:00)</a>:</h4>
<p>So, look at the non-lifetime issues and see if there are any heavy design/implementation issues</p>



<a name="225317601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225317601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225317601">(Feb 05 2021 at 16:03)</a>:</h4>
<p>It's also probably time (in the bigger scheme of things) to write that blog post I've been putting off to essentially say "Hey, here's what wg-traits did last year. We're expecting to work towards getting async fns in traits this year, along with Chalk work. Also, btw, GATs are looking really good, please stress test."</p>



<a name="225317838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225317838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225317838">(Feb 05 2021 at 16:04)</a>:</h4>
<p>I should probably have a look for additional problems now that has merged. I expect users are probably not as good at reporting things that are incorrectly allowed to compile as they are with ICEs.</p>



<a name="225318837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225318837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225318837">(Feb 05 2021 at 16:11)</a>:</h4>
<p>Yes, the other bit of that is coming up with a list of tests that we want/need added</p>



<a name="225322651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225322651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225322651">(Feb 05 2021 at 16:38)</a>:</h4>
<p>Also rustfmt needs updating to handle the syntax from <a href="https://github.com/rust-lang/rust/issues/79554">#79554</a></p>



<a name="225322762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225322762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225322762">(Feb 05 2021 at 16:39)</a>:</h4>
<p>and RA</p>



<a name="225329925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225329925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225329925">(Feb 05 2021 at 17:30)</a>:</h4>
<p>is the syntax documented in the reference?</p>



<a name="225329965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225329965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225329965">(Feb 05 2021 at 17:30)</a>:</h4>
<p>It's unstable, so no</p>



<a name="225330600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225330600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225330600">(Feb 05 2021 at 17:35)</a>:</h4>
<p>The change is that <em>GenericArgsBinding</em> defined here <a href="https://doc.rust-lang.org/reference/paths.html#paths-in-expressions">https://doc.rust-lang.org/reference/paths.html#paths-in-expressions</a> is now <em>PathExprSegment</em> <code>=</code> <em>Type</em></p>



<a name="225330752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225330752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225330752">(Feb 05 2021 at 17:36)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/44265">#44265</a> Could also do with an update</p>



<a name="225331777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225331777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225331777">(Feb 05 2021 at 17:45)</a>:</h4>
<p>From the RFC:</p>
<blockquote>
<p>A relatively uncommon feature of Rust is that it has two base kinds, whereas many languages which deal with higher-kindedness only have the base kind type. The other base kind of Rust is the lifetime parameter. If you have a type like Foo&lt;'a&gt;, the kind of Foo is lifetime -&gt; type.</p>
</blockquote>
<p>I guess that should be three base kinds, if one includes const parameters. Or rather, every type is a kind, so there are an infinite number of base kinds and mind-bendingness ensues</p>



<a name="225369550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225369550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nyms <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225369550">(Feb 05 2021 at 23:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/GATs.20triage/near/225317601">said</a>:</p>
<blockquote>
<p>... Also, btw, GATs are looking really good, please stress test."</p>
</blockquote>
<p>I like that kind of stuff <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span> what's a good way to start in this context?</p>



<a name="225379555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/225379555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#225379555">(Feb 06 2021 at 01:46)</a>:</h4>
<p>Hmm, use GATs is everything place that can think of. Use them in the patterns that you expect that. Build things :)</p>



<a name="226025537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025537">(Feb 11 2021 at 17:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you around?</p>



<a name="226025556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025556">(Feb 11 2021 at 17:17)</a>:</h4>
<p>I've been looking at <a href="https://github.com/rust-lang/rust/issues/76407">#76407</a></p>



<a name="226025578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025578">(Feb 11 2021 at 17:17)</a>:</h4>
<p>And thinking about the right "fix" here</p>



<a name="226025696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025696">(Feb 11 2021 at 17:18)</a>:</h4>
<p>The key issue here is &lt;T as MyTrait&gt;::Item&lt;'a&gt; doesn't get normalized to <code>u32</code></p>



<a name="226025733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025733">(Feb 11 2021 at 17:18)</a>:</h4>
<p>whereas if you remove the GAT <code>&lt;T as MyTrait&gt;::Item</code> <em>does</em></p>



<a name="226025773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025773">(Feb 11 2021 at 17:19)</a>:</h4>
<p>There is a somewhat related issue of trying to normalize <code>&lt;T as MyTrait&lt;'a&gt;&gt;::Item</code></p>



<a name="226025818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025818">(Feb 11 2021 at 17:19)</a>:</h4>
<p>but it seems like issue here is actually just easier to solve</p>



<a name="226025846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025846">(Feb 11 2021 at 17:19)</a>:</h4>
<p>Since the impl is fully defined</p>



<a name="226025874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226025874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226025874">(Feb 11 2021 at 17:19)</a>:</h4>
<p>and not dependent on bound vars</p>



<a name="226026011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226026011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226026011">(Feb 11 2021 at 17:20)</a>:</h4>
<p>Specifically, it's not getting normalized <a href="https://github.com/rust-lang/rust/blob/cfba499271ba53190a1d3647ff8f7202ec9ed6f5/compiler/rustc_trait_selection/src/traits/project.rs#L368">here</a></p>



<a name="226026062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226026062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226026062">(Feb 11 2021 at 17:20)</a>:</h4>
<p>But I think I'm probably missing some key details of how projections get normalized in rustc</p>



<a name="226026455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226026455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226026455">(Feb 11 2021 at 17:23)</a>:</h4>
<p>Is there any reason we can't normalize <code>&lt;T as MyTrait&gt;::Item</code> and then substitute the <code>'a</code>?</p>



<a name="226026855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226026855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226026855">(Feb 11 2021 at 17:25)</a>:</h4>
<p>Normalizing the projection might add obligations involving <code>'a</code></p>



<a name="226027046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/GATs%20triage/near/226027046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/GATs.20triage.html#226027046">(Feb 11 2021 at 17:26)</a>:</h4>
<p>hmm</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>